package cn.raven.org.domain;

import cn.raven.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**

* @Description: 部门实体类
* @Author: king
* @Version: 1.0
* @Date:  2022/6/21 17:11
  */
@Data
public class Department  extends BaseDomain {

    //部门编号
    private String sn;
    //部门名称
    private String name;
    //部门上级目录
    private String dirPath;
    //状态
    private Integer state;
    //部门管理员id
    private Long managerId;
    //上级部门id
    private Long parentId;
    //引用属性manager 多对一
    private Employee manager;
    //引用属性parent 多对一  自连接
    private Department parent;
    //子部门数据集合
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();

}
